﻿using System;
using System.Windows.Forms;
using System.ComponentModel;

namespace SimpleMediaManager.Controls
{
    public partial class ListViewComboBox : ListView
    {
        private const int WM_VSCROLL = 0x115;
        private const int WM_HSCROLL = 0x114;

        public ListViewComboBox()
        {
            InitializeComponent();
        }

        public ListViewComboBox(IContainer container)
        {
            container.Add(this);

            InitializeComponent();
        }

        protected override void WndProc(ref Message msg)
        {
            if ((msg.Msg == WM_VSCROLL) || (msg.Msg == WM_HSCROLL))
            {
                this.Focus();
            }

            base.WndProc(ref msg);
        }
    }
}
